package com.fuxi;

public class Fuxi3 {

	public static void main(String[] args) {
		
		
		int[][] data = new int[5][10];
		int rowmax, colmax;
		int max = Integer.MIN_VALUE;
		for(int i = 0; i< data.length; i++) {
			for(int j = 0; j< data[0].length; j++) {
				int v = data[i][j];
				if(v > max) {
					max = v;
					rowmax = i;
					colmax = j;
				}
			}
		}
		
		printDJX(20);
		printSXH();
		int x = 123;
		int gewei = x % 10;
		int baiwei = (x/10) %10;
		int qianwei = (x/100) %10;
	}
	int max(int data[]) {
		int max = data[0];
		for(int i = 0; i< data.length; i++) {
			max = max >= data[i]?max:data[i];
		}
		return max;
	}
	
	int level(int score) {
		return score/10; 
	}
	void show(int score) {
		int level = level(score);
		switch(level) {
		case 1:
		case 2:
		case 3:
		
			
		}
		
	}
	int factor(int n){
		int rst = 1;
		for(int i = 1; i <=n; i++) {
			rst *= i;
		}
		return rst;
	}
	static int compute(int x) {
		int g = x % 10;
		int s = (x/10) %10;
		int b = (x/100) %10;
		int rst = g*g*g + s*s*s + b*b*b;
		return rst;
		
	}
	
	static boolean is_sxh(int x) {
		int y = compute(x);
		return x == y;
	}
	static void printSXH() {
		for(int i = 100; i< 1000; i++) {
			if(is_sxh(i))
				System.out.println(i);
			
		}
	}
	
	static void printDJX(int w) {
		for(int i = 0; i < w; i++) {
			for(int j = 0; j < w; j++) {
				int v =  i == j || i+ j == w-1? 1:0;
				System.out.print(" " + v);
			}
			System.out.println();
			
		}
	}
	
	
	

}
